#!/bin/bash

outfile='big_file.txt'

function gen_file ( )
{
    for i in $( seq 1 100 );
    do
        for j in $( seq 1 100);
        do 
            echo $i.$j >> $outfile
        done
    done
}

gen_file 

echo 'sed usage'

#insert 'ABCDE' before second line
sed '2iABCDE' $outfile 

#insert  'ABCDE' after second line
sed '2aABCDE' $outfile

#replace string
sed 's/ABCDE/12345/' $outfile

#print specified line
sed -n '100, 103p' $outfile




